<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./libs/layui/css/layui.css">
</head>

<body>
    <input type="text" class="layui-input" id="test1">
    <button>点我</button>

    <script src="./libs/layui/layui.js"></script>
    <script>
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#test1' //指定元素
        });
        document.querySelector('button').addEventListener('click', function () {
            console.log(document.querySelector('#test1').value)
        })
    </script>
</body>

</html>